<?php

/*
 * Edit by shengxin
 * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
 */

namespace api\mall\task;

use api\mall\model\StoreLogModel;
/**
 * 检测好友成群任务是否完成
 *
 * @author PC
 */
class MassShopping extends TaskChecker{


    protected function check($task_data, $cfg):bool {
        return $task_data>=$cfg['task_req'];
    }
    
    protected function queryTaskData($user):int {
        $model = new StoreLogModel();
        $num = $model->where('user_id',$user->id)->where('status',1)->count();
        return $num;
    }
}
